<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:65:"D:\www\7.com\public/../application/admin\view\xshop\nav\edit.html";i:1588217084;s:55:"D:\www\7.com\application\admin\view\layout\default.html";i:1583049507;s:52:"D:\www\7.com\application\admin\view\common\meta.html";i:1583049507;s:54:"D:\www\7.com\application\admin\view\common\script.html";i:1583049507;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config); ?>
    };
</script>
    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Title'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="<?php echo htmlentities($row['title']); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Description'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" data-rule="required" class="form-control" name="row[description]" type="text" value="<?php echo htmlentities($row['description']); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('NavType'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-nav_type" data-rule="required" class="form-control" name="row[nav_type]">
                <option value="0" <?php if($row['nav_type'] == 0): ?>selected<?php endif; ?>>轮播图</option>
                <option value="1" <?php if($row['nav_type'] == 1): ?>selected<?php endif; ?>>导航</option>
                <option value="2" <?php if($row['nav_type'] == 2): ?>selected<?php endif; ?>>广告</option>
                <option value="3" <?php if($row['nav_type'] == 3): ?>selected<?php endif; ?>>分类展示</option>
                <option value="4" <?php if($row['nav_type'] == 4): ?>selected<?php endif; ?>>通告</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Type'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-type" data-rule="required" class="form-control" name="row[type]">
                <option value="0" <?php if($row['type'] == 0): ?>selected<?php endif; ?> data-target="normal">无跳转</option>
                <option value="1" <?php if($row['type'] == 1): ?>selected<?php endif; ?> data-target="product">跳转到商品</option>
                <option value="2" <?php if($row['type'] == 2): ?>selected<?php endif; ?> data-target="category">跳转到分类</option>
                <option value="3" <?php if($row['type'] == 3): ?>selected<?php endif; ?> data-target="router">跳转到页面</option>
                <option value="6" <?php if($row['type'] == 6): ?>selected<?php endif; ?> data-target="tabbar">跳转到底部导航</option>
                <option value="4" <?php if($row['type'] == 4): ?>selected<?php endif; ?> data-target="link">跳转到外部链接</option>
                <option value="5" <?php if($row['type'] == 5): ?>selected<?php endif; ?> data-target="article">跳转到文章</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Target'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <div id="target-render-content" data-value="<?php echo $row['target']; ?>" data-label="<?php echo $target_name; ?>"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Image'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="<?php echo htmlentities($row['image']); ?>">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-image"><i class="fa fa-upload"></i> <?php echo __('Upload'); ?></button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> <?php echo __('Choose'); ?></button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">其他参数</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[params]">
                <dd>
                    <ins><?php echo __('Array key'); ?></ins>
                    <ins><?php echo __('Array value'); ?></ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> <?php echo __('Append'); ?></a></dd>
                <textarea name="row[params]" class="form-control hide" cols="30" rows="5"><?php echo htmlentities($row['params']); ?></textarea>
            </dl>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Sort'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" class="form-control" name="row[sort]" type="number" value="<?php echo htmlentities($row['sort']); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Status'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <?php echo build_radios('row[status]', [1 => '正常', 0 => '隐藏'], $row['status']); ?>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled"><?php echo __('OK'); ?></button>
            <button type="reset" class="btn btn-default btn-embossed"><?php echo __('Reset'); ?></button>
        </div>
    </div>
</form>

<script id="normal" type="text/html">
    <div><span class="form-control">无</span>
    <input id="c-target" name="row[target]" type="hidden" value="">
    </div>
</script>

<script id="product" type="text/html">
    <div class="input-group">
        <input id="c-target_label" class="form-control" size="50" value="<?php echo $row['type']==1?$target_name : ''; ?>" type="text" readonly>
        <input type="hidden" id="c-target" name="row[target]" value="<?php echo $row['target']; ?>" data-rule="required">
        <div class="input-group-addon no-border no-padding">
            <span><button type="button" id="btn-choose-product" class="btn btn-primary xshop-choose-product" data-label-id="c-target_label" data-input-id="c-target" data-preview-id="p-target" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
        </div>
        <span class="msg-box n-right" for="c-product"></span>
    </div>
    <ul class="row list-inline" id="p-target"></ul>
</script>

<script id="category" type="text/html">
    <div class="input-group">
        <input id="c-target_label" class="form-control" size="50" value="<?php echo $row['type']==2?$target_name : ''; ?>" type="text" readonly>
        <input type="hidden" id="c-target" data-rule="required" name="row[target]" value="<?php echo $row['target']; ?>">
        <div class="input-group-addon no-border no-padding">
            <span><button type="button" id="btn-choose-category" class="btn btn-primary xshop-choose-category" data-label-id="c-target_label" data-input-id="c-target" data-preview-id="p-target" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
        </div>
        <span class="msg-box n-right" for="c-category"></span>
    </div>
    <ul class="row list-inline" id="p-target"></ul>
</script>

<script id="router" type="text/html">
    <input class="form-control" data-rule="required" name="row[target]" value="<?php echo $row['target']; ?>" placeholder="请输入页面地址" />
</script>

<script id="link" type="text/html">
    <input class="form-control" data-rule="required" name="row[target]" value="<?php echo $row['target']; ?>" placeholder="请输入URL链接" />
</script>

<script id="article" type="text/html">
    <div class="input-group">
        <input id="c-target_label" class="form-control" size="50" value="<?php echo $row['type']==5?$target_name : ''; ?>" type="text" readonly>
        <input type="hidden" id="c-target" data-rule="required" name="row[target]" value="<?php echo $row['target']; ?>">
        <div class="input-group-addon no-border no-padding">
            <span><button type="button" id="btn-choose-article" class="btn btn-primary xshop-choose-article" data-label-id="c-target_label" data-input-id="c-target" data-preview-id="p-target" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
        </div>
        <span class="msg-box n-right" for="c-article"></span>
    </div>
    <ul class="row list-inline" id="p-target"></ul>
</script>

<script id="tabbar" type="text/html">
    <input class="form-control" data-rule="required" name="row[target]" value="<?php echo $row['target']; ?>" placeholder="请输入底部导航链接,比如/pages/user/user" />
</script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
    </body>
</html>